-
Notifications
You must be signed in to change notification settings - Fork 182
PMM-14567: Add MongoDB Realtime Agent Type (Option 3) #4805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: PMM-14550-rt-qan-mongo
Are you sure you want to change the base?
Conversation
Implement database schema for feature configuration using Option 3: - Create new agent record type for real-time analytics - Add MongoDBRealtimeAgentType constant to agent types - Use existing agents table infrastructure - Associate agent with service - Agent status (running/stopped) represents enabled/disabled - Retrieve credentials from existing MongoDB agents during creation Changes: - Add MongoDBRealtimeAgentType constant to models - Update DSN helpers to handle MongoDB realtime agent - Add CreateMongoDBRealtimeAgent helper function - Update proto file with new agent type and messages - Add agent to Files() method for certificate handling No database migration needed as existing agents table supports new type.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## PMM-14550-rt-qan-mongo #4805 +/- ##
==========================================================
+ Coverage 45.28% 45.93% +0.65%
==========================================================
Files 364 364
Lines 37777 37831 +54
==========================================================
+ Hits 17106 17377 +271
+ Misses 19028 18782 -246
- Partials 1643 1672 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Introduced RTAOptions type for future Real-Time Analytics configuration. - Implemented database/sql/driver.Valuer and Scanner interfaces for RTAOptions. - Updated Agent and CreateAgentParams to include RTAOptions. - Modified database schema to add rta_options column to agents table.
- Deleted MongoDBRealtimeAgent message and its associated parameters from the proto file. - Removed AGENT_TYPE_MONGODB_REALTIME_AGENT from AgentType enum. - Cleaned up related comments and documentation for clarity.
|
@copilot run |
- Integrated RTAOptions into the Agent model, including updates to the Columns, String, Values, and Pointers methods to accommodate the new field. - Adjusted the database schema to include the rta_options column for proper data handling.
…eation logic. Upgraded actions/checkout to a specific commit and actions/setup-node to a specific version. Added logic to prevent duplicate MongoDB Realtime Agents by checking for existing agents before creation.
Summary
Implements PMM-14567: Create Database Schema for Feature Configuration using Option 3 - Create Record in Agents Table.
This PR adds a new agent type
mongodb-realtime-agentthat uses the existing agents table infrastructure to store real-time analytics enable/disable status per service.Key Changes
MongoDBRealtimeAgentTypeconstantCreateMongoDBRealtimeAgent()helper that retrieves credentials from existing MongoDB agents (QAN/exporter) for the serviceImplementation Details
Files Changed
api/inventory/v1/agents.proto: Added AGENT_TYPE_MONGODB_REALTIME_AGENT enum and messagesmanaged/models/agent_model.go: Added MongoDBRealtimeAgentType constant and DSN supportmanaged/models/agent_helpers.go: Added CreateMongoDBRealtimeAgent() helper functionmanaged/models/dsn_helpers.go: Updated to include new agent type in service lookupsTest Plan